package cl.sodexo.com.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.log4j.Logger;

public class PerfilDAO extends AbstractDAO{
	
	private static final Logger logger	= Logger.getLogger(PerfilDAO.class);
	private static final Integer user	= 1;
	private static final Integer jefe	= 2;
	private static final Integer op		= 3;
	
	public Boolean esUser(Integer idUser) throws SQLException{
		return this.validate(user, idUser);
	}
	
	public Boolean esJefe(Integer idUser) throws SQLException{
		return this.validate(jefe, idUser);
	}
	
	public Boolean esOperador(Integer idUser) throws SQLException{
		return this.validate(op, idUser);
	}
	
	private Boolean validate(Integer idPerfil, Integer idUser) throws SQLException{
		boolean resultado	= false;
		Connection con		= null;
		ResultSet rs		= null;
		PreparedStatement ps= null;
		@SuppressWarnings("unused")
		StringBuilder sql	= null;
		
		try{
			sql = new StringBuilder();
			
			
		}catch (Exception e) {
			logger.error(e, e);
		}finally{
			super.closeAll(con, ps, rs);
		}
		
		return resultado;
	}

}
